package org.liveboardgames.agricola.domain.common;

import org.liveboardgames.agricola.model.enums.BirthStatusEnum;

public class Peep {

  private Long id;

  // private Player owner;

  private BirthStatusEnum status = BirthStatusEnum.ADULT;

  /**
   * @param id
   *          the {@link #id} to set
   */
  public void setId(Long id) {
    this.id = id;
  }

  /**
   * @return the {@link #id}
   */
  public Long getId() {
    return id;
  }

  // /**
  // * @return the {@link #owner}
  // */
  // public Player getOwner() {
  // return owner;
  // }
  //
  // /**
  // * @param owner
  // * the {@link #owner} to set
  // */
  // public void setOwner(Player owner) {
  // this.owner = owner;
  // }

  /**
   * @return the {@link #status}
   */
  public BirthStatusEnum getStatus() {
    return status;
  }

  /**
   * @param status
   *          the {@link #status} to set
   */
  public void setStatus(BirthStatusEnum status) {
    this.status = status;
  }

  @Override
  public boolean equals(Object obj) {
    boolean result = false;
    if (obj instanceof Peep && this.id != null) {
      result = this.id.equals(((Peep)obj).getId());
    }
    return result;
  }

  @Override
  public int hashCode() {
    int hashCode = 1;
    if (this.id != null) {
      hashCode = this.id.intValue();
    }
    return hashCode;
  }

  @Override
  public String toString() {
    return "Peep: " + this.id;
  }

}
